package com.puman.watchtrade.fragment.home.adapter;

import java.util.List;

import android.app.Activity;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;

import com.puman.watchtrade.R;
import com.puman.watchtrade.fragment.home.model.Varieties;
import com.puman.watchtrade.util.ImageDownloader;
import com.puman.watchtrade.util.OnImageDownload;

public class GoodsParmListViewAdapter extends BaseAdapter{

	private LayoutInflater listContainer; // ��ͼ����
	private View view;
	private Activity activity;
	private ImageDownloader mDownloader;
	List<String> paraList;

	public final class ListItemView {
		public TextView param;
	}

	public GoodsParmListViewAdapter(Activity activity, List<String> paraList) {
		this.activity = activity;
		this.paraList = paraList;
		listContainer = LayoutInflater.from(activity);
		// TODO Auto-generated constructor stub
	}

	
	/**
	 */
	public View getView(final int position, View convertView, ViewGroup parent) {
		// TODO Auto-generated method stub
		final ListItemView listItemView;
		final int selectID = position;
		if (convertView == null) {
			listItemView = new ListItemView();
			convertView = listContainer.inflate(R.layout.goods_text_item, null);
			listItemView.param = (TextView) convertView.findViewById(R.id.item_title);
			convertView.setTag(listItemView);
		} else {
			listItemView = (ListItemView) convertView.getTag();
		}
		listItemView.param.setText(paraList.get(position));
		

		return convertView;
	}

	public int getCount() {
		// TODO Auto-generated method stub
		return paraList.size();
	}

	public Object getItem(int arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	public long getItemId(int arg0) {
		// TODO Auto-generated method stub

		return 0;
	}

}